<template>
  <div>
    <div slot="header" class="clearfix" style="text-align: center;line-height: 30px">
      <h3>供应商退货表</h3>
    </div>

    <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
      <el-row>
        <el-col :span="12">
          <el-form-item label="订单编号">
            <el-input v-model="ordernumber"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="采购编号">
            <el-input v-model="buynumber"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="12">
          <el-form-item label="供应商编号">
            <el-input v-model="usernumber"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="退货数量">
            <el-input v-model="num"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="退货原因">
            <el-input v-model="returncause"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>
  </div>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Ssalegoodsdecisionok",
  props: {
    usercodeTag: String
  },
  data() {
    return {
      ordernumber: '',
      buynumber: '',
      usernumber: '',
      num: '',
      returncause:''
    }
  },
  mounted() {
    this.init(this.usercodeTag)
  },
  methods: {
    init(tag) {
      let url = '/csc/supplierreturn/bySupplierreturnId/' + tag
      this.$axios.get(url).then(r => {
        console.log(this.usercodeTag)
        console.log(r.data)
        this.ordernumber = r.data.ordernumber
        this.buynumber = r.data.buynumber
        this.usernumber = r.data.usernumber
        this.num = r.data.num
        this.returncause = r.data.returncause
      })
    }
  }
}
</script>

<style scoped>

</style>